***Empirical Analyses***

********Figure 1 & 2
cd "...."

use replicationdata, clear

global controls politicalinterest stfdem ideologext partyattach tradeunion trstprt feelingincome educ gender age lag1 v2x_libdem_codelow

*****(Interaction)

eststo third: logit pbldmn_new c.selfdirection_s##i.partyrank_gov3 c.stimulation_s##i.partyrank_gov3 c.hedonism_s##i.partyrank_gov3  conformity_s tradition_s benevolence_s universalism_s achievement_s power_s security_s $controls i.ccode, robust

keep if e(sample)

eststo one: logit pbldmn_new i.partyrank_gov4 selfdirection_s stimulation_s hedonism_s  conformity_s tradition_s benevolence_s universalism_s achievement_s power_s security_s $controls, robust

eststo two: logit pbldmn_new i.partyrank_gov3 selfdirection_s stimulation_s hedonism_s  conformity_s tradition_s benevolence_s universalism_s achievement_s power_s security_s $controls, robust

eststo fourth: logit pbldmn_new c.selfdirection_s##i.partyrank_gov4 c.stimulation_s##i.partyrank_gov4 c.hedonism_s##i.partyrank_gov4  conformity_s tradition_s benevolence_s universalism_s achievement_s power_s security_s $controls i.ccode, robust

*Table 1

esttab one fourth third two using "model.tex", tex replace b(%10.3f) se stats(ll N aic bic, labels("Log lik." "N" "AIC" "BIC") fmt(%10.3f %10.3f %10.0f)) label starlevels(* 0.1 ** 0.05 *** 0.01) title("Logistic Regression Estimates") varlabels(_cons  Constant) addnote("Robust standard errors in parentheses. Two-tailed tests.") drop(*.ccode) nobase nonumbers  noomit obslast  compress long mtitle("Model 1" "Model 2" "Model 3" "Model 4") 

*Table A1
esttab one fourth third two using "model.tex", tex replace b(%10.3f) se stats(ll N aic bic, labels("Log lik." "N" "AIC" "BIC") fmt(%10.3f %10.3f %10.0f)) label starlevels(* 0.1 ** 0.05 *** 0.01) title("Logistic Regression Estimates") varlabels(_cons  Constant) addnote("Robust standard errors in parentheses. Two-tailed tests.") nobase nonumbers  noomit obslast  compress long mtitle("Model 1" "Model 2" "Model 3" "Model 4") 

*Table A2
est restore third

eststo desc: estpost sum  pbldmn_new partyrank_gov3 selfdirection_s stimulation_s hedonism_s  conformity_s tradition_s benevolence_s universalism_s achievement_s power_s security_s politicalinterest stfdem ideologext tradeunion trstprt feelingincome educ gender age v2x_libdem_codelow lag1   if e(sample)
esttab desc using appendixdescriptive.tex, replace cells("mean(fmt(2)) sd(fmt(2)) min(fmt(2)) max(fmt(2)) count(fmt(0))") collabels("Mean" "Std.Dev." "Min." "Max." "N") noobs nonumber label title("Descriptive Statistics") longtable

*Appendix Figure 1

encode cntry, gen(ccode2)

twoway (scatter year ccode2 if sumcoalparties==1, msymbol(circle)) (scatter year ccode2 if sumcoalparties>1, msymbol(diamond)), ytitle("ESS Survey Years") xtitle("") ylabel(2004(2)2018) xlabel(1(1)21, labels labsize(tiny)  format(%9.0g) valuelabel angle(vertical)) legend(order(1 "Single Party Government" 2 "Coalition Government") position(6) row(1)) 

graph export appendixfigure.pdf, replace

*Figure 1

est restore fourth
foreach var of varlist selfdirection_s-hedonism_s {
margins, dydx(`var') at(partyrank_gov4=(0/2) (means)_all)
marginsplot, xsca(r(-.15 1.05)) addplot(hist partyrank_gov4 if e(sample) , xsca(r(-.30 1.05))  percent yaxis(2) yscale(off axis(2)) color(black%25) lcolor(none) xlab(0 "Opposition" 1 "JCPV" 2 `" "SCPV""SPGV" "')) legend(off) recast(scatter) xtitle("") title("") ytitle("") saving(`var'_pr.gph, replace)
}
gr combine selfdirection_s_pr.gph stimulation_s_pr.gph hedonism_s_pr.gph, l1title(Effects on Pr(Attending Peaceful Demonstrations), size(small)) ycommon row(1) saving(open_dv.gph, replace)
graph export figure1.pdf, replace

*Figure 2

margins, at(stimulation=(1(0.5)6) partyrank_gov4=(0/2) (means)_all)
marginsplot, addplot(hist stimulation_s if e(sample) ,  percent yaxis(2) yscale(off axis(2)) color(black%25) lcolor(none) xlab(1(1)6)) legend(col(3) row(1) pos(6)) title("") xtitle("Stimulation") ytitle("Pr(Attending Peaceful Demonstrations)", size(small)) saving(stimulation_pr2.gph)

graph export figure2.pdf, replace

